/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.knet.sp.ncrm.modules.customer.potentialdistrecord.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.knet.sp.ncrm.common.persistence.DataEntity;

/**
 * 分配记录Entity
 * @author 葛海洋
 * @version 2015-08-26
 */
public class PotentialDistRecord extends DataEntity<PotentialDistRecord> {
	
	private static final long serialVersionUID = 1L;
	private Long version = 0L;		// version
	private String createUserId;		// 分配人
	private Date dateCreated;		// 创建时间
	private String executorId;		// 执行人
	private Date lastUpdated;		// 更新时间
	private String potentialCustomerId;		// 潜在客户id
	
	public PotentialDistRecord() {
		super();
	}

	public PotentialDistRecord(String id){
		super(id);
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}
	
	@Length(min=1, max=64, message="分配人长度必须介于 1 和 64 之间")
	public String getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	
	@Length(min=1, max=64, message="执行人长度必须介于 1 和 64 之间")
	public String getExecutorId() {
		return executorId;
	}

	public void setExecutorId(String executorId) {
		this.executorId = executorId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="更新时间不能为空")
	public Date getLastUpdated() {
		return lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}
	
	@Length(min=1, max=64, message="潜在客户id长度必须介于 1 和 64 之间")
	public String getPotentialCustomerId() {
		return potentialCustomerId;
	}

	public void setPotentialCustomerId(String potentialCustomerId) {
		this.potentialCustomerId = potentialCustomerId;
	}
	
}